import request from '@/config/axios'

export interface MemberMechanismVO {
  id: number
  levelId: number
  time: string
  money: string
  status: number
}

// 查询相亲会员等级机制列表
export const getMemberMechanismPage = async (params) => {
  return await request.get({ url: `/blind/member-mechanism/page`, params })
}

// 查询相亲会员等级机制详情
export const getMemberMechanism = async (id: number) => {
  return await request.get({ url: `/blind/member-mechanism/get?id=` + id })
}

// 新增相亲会员等级机制
export const createMemberMechanism = async (data: MemberMechanismVO) => {
  return await request.post({ url: `/blind/member-mechanism/create`, data })
}

// 修改相亲会员等级机制
export const updateMemberMechanism = async (data: MemberMechanismVO[]) => {
  return await request.put({ url: `/blind/member-mechanism/update`, data })
}

// 删除相亲会员等级机制
export const deleteMemberMechanism = async (id: number) => {
  return await request.delete({ url: `/blind/member-mechanism/delete?id=` + id })
}

// 导出相亲会员等级机制 Excel
export const exportMemberMechanism = async (params) => {
  return await request.download({ url: `/blind/member-mechanism/export-excel`, params })
}
